import QtQuick 1.0

Rectangle{
    width: myApp.width
    height: 437
    color: "transparent"


    // ===News Model===//
    XmlListModel {
        id: newsModel

        source: "http://news.google.com/news?ned=us&topic=h&output=rss"
        query: "/rss/channel/item"

        XmlRole { name: "title"; query: "title/string()" }
    }


    Image {
        id: newstitle
        width: parent.width
        height: 40
        source: "images/newsbox.png"
        Text {
            id: newstitletext
            anchors.centerIn: parent
            text: "Top News"
            font.bold: true
            font.pixelSize: 22
            color: "#809fbb"

        }

    }

    ListView{
        width: parent.width
        height: parent.height - newstitle.height
        anchors.top: newstitle.bottom
        id: newsList
        //                    anchors.centerIn: parent
        model: newsModel
        delegate:BorderImage{
            width: parent.width
            height: 40

            source:"images/newsbox.png"
            Text {
//                            id: name
                width: parent.width-10
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: 10
                text: "\u2022 " + title
                wrapMode:Text.WordWrap
                color: "#809fbb"
                font.weight: Font.DemiBold
                font.pixelSize: 14

            }
        }
    }
}
